package com.softa.vo;

import com.github.pagehelper.PageHelper;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by yangl on 2017/3/11.
 */
public class DataGridRequest {
    private int page = 1; //当前页,名字必须为page
    private int start = 0;//起始行
    private int rows = 10; //每页大小,名字必须为rows

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    /**
     * 启用分页插件
     * @return
     */
    public com.github.pagehelper.Page<Object> startPagePlugin() {
//        return PageHelper.offsetPage(start, rows);
        return PageHelper.startPage(page, rows);
    }

}
